@import "icon.scss";

@media screen and (max-width: 500px) {
  .search {
    padding: 0 30px;

    > .inp {
      height: 45px;

      > input {
        font-size: 14px !important;

        &::-webkit-input-placeholder {
          font-size: 14px !important;
          font-weight: 600;
          color: #898989;
        }
      }

      > .search-type {
        width: 60px !important;
        font-size: 14px !important;
      }
    }


  }
  .history {
    width: calc(100vw - 60px);
  }
  .drawer-main {
    overflow: scroll !important;
  }
  .bottomtab {
    display: none !important;
  }
  .span {
    width: 80px !important
  }
}

[v-cloak] {
  opacity: 0;
}

*::-webkit-scrollbar {
  display: none;
}

@media screen and (min-width: 501px) {
  .search {
    width: 50%;
    max-width: 600px;
    min-width: 300px;

    > .inp {
      width: 100%;
      height: 50px;
    }
  }
  .history {
    width: 50vw;
    max-width: 600px;
    min-width: 300px;
  }
}


* {
  margin: 0;
  padding-left: 0;
}

#root {
  position: fixed;
  top: 0;
  width: 100vw;
  height: 100vh;
  transition: background 2s;
  overflow: hidden;
  opacity: 1;
}

.main-page {
  position: fixed;
  width: 100vw;
  height: 100vh;
  transition: all 500ms;

  > .search {
    position: relative;
    margin: auto;
    transition: all 500ms;

    > .search-preview {
      position: relative;
      z-index: 9;
      margin-top: -30px;
      background-color: rgba(255, 255, 255, 0.8);
      border-radius: 15px;
      padding: 15px;
      z-index: 999;

      > .AppList {
        width: 100%;
        overflow-x: scroll;
        display: flex;
        flex-wrap: nowrap;
        list-style: none;

        > li {
          flex-shrink: 0;
          margin-right: 15px;
          width: 50px;
          height: 70px;
          display: flex;
          flex-direction: column;

          > .img {
            cursor: pointer;
            margin-left: 5px;
            flex-shrink: 0;
            width: 40px;
            height: 40px;
            background-color: rgba(255, 255, 255, 0.65);
            border-radius: 100px;
            display: flex;
            align-items: center;
            justify-content: center;

            > img {
              width: 20px;
              height: 20px;
            }
          }

          > .text {
            width: 100%;
            white-space: nowrap;
            font-size: 12px;
            overflow: hidden;
            text-overflow: ellipsis;
            text-align: center;
          }
        }
      }

      > .UrlList {
        list-style: none;

        > li {
          display: flex;
          cursor: pointer;
          align-items: center;
          padding: 3px 0;

          &:hover {
            background-color: rgba(206, 206, 206, 0.24);
          }

          > span {
            flex-shrink: 0;
            width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 14px;
          }

        }
      }
    }

    > .inp {
      border: none;
      overflow: hidden;
      border-radius: 50px;
      background: aliceblue;
      margin: 20vh auto auto;
      display: flex;
      box-shadow: 0 0 5px #ffffff;

      > .search-type {
        width: 80px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;

        > img {
          width: 26px;
          height: 26px;
        }
      }

      > input {
        flex: 7;
        height: 100%;
        border: none;
        outline: none;
        padding: 0 15px;
        font-size: 16px;
        font-weight: 600;
        text-overflow: ellipsis;

        &::-webkit-input-placeholder {
          font-size: 16px;
          font-weight: 600;
          color: #898989;
        }
      }
    }

    > .history {
      position: absolute;
      //height: 200px;
      top: 100px;
      display: grid;
      user-select: none;
      grid-template-rows:repeat(auto-fill, 1fr);
      grid-template-columns:1fr 1fr 1fr 1fr;
      grid-row-gap: 15px;

      > .item {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: pointer;

        > .img {
          pointer-events: none;
          width: 50px;
          height: 50px;
          background-color: rgba(255, 255, 255, 0.65);
          border-radius: 100px;
          display: flex;
          align-items: center;
          justify-content: center;

          > img {
            position: relative;
            width: 20px;
            height: 20px;
          }
        }

        > .span {
          pointer-events: none;
          max-width: 90%;
          width: 100px;
          margin-top: 10px;
          text-overflow: ellipsis;
          white-space: nowrap;
          overflow: hidden;
          font-size: 13px;
          font-weight: 400;
          text-shadow: 0 0 5px rgba(239, 239, 239, 0.73);
          text-align: center;
        }
      }
    }

    > .sou {
      position: relative;
      margin-top: 10px;
      margin-left: calc(2% - 8px);
      width: 300px;

      transform: scale(0);
      transition: all 300ms;

      > .sou-main {
        display: flex;
        justify-content: space-around;
        background-color: #ffffff;
        border-radius: 50px;
        height: 40px;
        transition: all 500ms;
        align-items: center;

        > img {
          width: 25px;
          height: 25px;
          cursor: pointer;
        }


        &::after {
          position: absolute;
          content: " ";
          width: 12px;
          height: 12px;
          background-color: #ffffff;
          top: -5px;
          left: 30px;
          transform: rotate(45deg);
          border-radius: 2px;
          z-index: -1;
        }
      }
    }
  }
}

.drawer {
  position: fixed;
  height: 70%;
  width: 100vw;
  bottom: 0;
  transform: translateY(10%);
  transition: all 500ms;
  background: rgba(255, 255, 255, 0.36);
  border-radius: 15px 15px 0 0;
  pointer-events: none;
  //backdrop-filter: blur(5px);
  opacity: 0;
  user-select: none;

  > .drawer-main {
    margin-top: 20px;
    position: absolute;
    width: 100%;
    overflow-y: hidden;
    height: calc(100% - 20px);
    padding: 0 0;

    > .x-list {
      > .title {
        cursor: pointer;

        > span {
          margin-left: 10px;
          pointer-events: none;
        }

        margin-left: 15px;
        font-size: 17px;
        color: #383838;
      }
    }

    > .x-list > .y-list {
      margin-top: 20px;
      display: flex;
      flex-wrap: wrap;

      > .dreaer-list {
        width: 25%;
        height: 100px;
        display: flex;
        flex-direction: column;
        align-items: center;
        cursor: pointer;

        &:hover {
          > .img {
            transform: scale(1.1);
            box-shadow: 0 0 12px rgba(255, 255, 255, 0.73);
          }
        }

        > .img {
          pointer-events: none;
          width: 50px;
          height: 50px;
          border-radius: 50px;
          background-color: azure;
          display: flex;
          align-items: center;
          justify-content: center;
          transition: all 300ms;


          > img {
            object-fit: cover;
            width: 20px;
            height: 20px;
          }
        }

        > .iconf {
          font-size: 30px;
          width: 60px;
          height: 60px;
          border-radius: 5px;
          object-fit: cover;
          background-color: azure;
          display: flex;
          align-items: center;
          justify-content: center;
          font-weight: 500;
        }

        > .name {
          pointer-events: none;
          width: 70px;
          margin-top: 5px;
          font-size: 12px;
          white-space: nowrap;
          text-overflow: ellipsis;
          overflow: hidden;
          text-align: center;
        }
      }
    }
  }
}

.show {
  transform: translateY(0%) !important;
  opacity: 1;
  pointer-events: all;
}

.souShow {
  transform-origin: left top;
  transform: scale(1) !important;
}

body {
  position: fixed;
  top: 0;
  height: 100vh;
  width: 100vw;
  overscroll-behavior-y: contain;
}

.moveUp {
  transform: translateY(-100px);
}


.menu_add {
  > .el-input {
    margin-bottom: 15px;
  }


  > .other {
    display: flex;
    margin-top: 15px;

    > .el-select {
      width: 300px;
      margin-right: 15px;
    }

    > .el-input {
      width: 200px;

    }

    > .el-switch {
      flex-shrink: 0;
      justify-content: flex-end;
      align-self: center;
      margin-left: 15px;
    }
  }
}

.el-dialog__headerbtn {
  font-size: 25px !important;
}

.el-dialog {
  border-radius: 10px !important;
  z-index: 9999;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
}

.tabar {
  position: fixed;
  width: 90px;
  border-radius: 0 5px 5px 5px;
  overflow: hidden;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  user-select: none;
  z-index: 9999;

  > div {
    height: 30px;
    display: flex;
    align-items: center;
    font-weight: 300;
    font-size: 15px;
    user-select: none;

    &:hover {
      color: goldenrod;
      cursor: pointer;
    }
  }
}

.bottomtab {
  position: absolute;
  bottom: 10px;
  width: 100vw;
  //display: none;

  > .al {
    padding-right: 15px;
    margin: auto;
    height: 70px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(10px);
    transition: all 300ms;
    display: flex;
    align-items: center;

    > div {
      flex-shrink: 0;
      width: 50px;
      height: 50px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 5px;
      margin-left: 15px;

      > span {
        font-size: 20px;
        font-weight: 900;
      }

      > img {
        width: 100%;
        height: 100%;
        border-radius: 10px;
      }
    }
  }
}

.shows {
  opacity: 0;
}


/* 可以设置不同的进入和离开动画 */
/* 设置持续时间和动画函数 */
.slide-fade-enter-active {
  transition: all .3s ease;
}

.slide-fade-leave-active {
  transition: all .3s;
}

.slide-fade-enter, .slide-fade-leave-to
  /* .slide-fade-leave-active for below version 2.1.8 */
{
  transform: translateY(-10px);
  opacity: 0;
}


/* 可以设置不同的进入和离开动画 */
/* 设置持续时间和动画函数 */
.showings-enter-active {
  transition: all .3s ease;
}

.showings-leave-active {
  transition: all .3s;
}

.showings-enter, .showings-leave-to
  /* .slide-fade-leave-active for below version 2.1.8 */
{
  opacity: 0;
}


footer {
  position: fixed;
  bottom: 0;
  height: 30px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;

  > span > a, > span {
    font-size: 13px;
    color: antiquewhite;
    text-underline: none;
    list-style: none;
    text-decoration: none;

    > a:hover {
      color: brown;
    }
  }
}

.tiao {
  animation: tiaoani .8s infinite;
}

@keyframes tiaoani {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.el-upload, .el-upload-dragger {
  width: 100% !important;
}
